<?php 

$pid = explode(',', $model->pro_cid);
$pid = $pid[0];
$menu = array_reverse(Category::model()->generateBreadcrumbs($pid,'list'));

$this->breadcrumbs = array_merge($this->breadcrumbs,$menu);
$this->breadcrumbs = array_merge($this->breadcrumbs,array($model->pro_name));

$this->pageTitle = Category::model()->generatePageTitle(array_reverse($this->breadcrumbs,'_')).Yii::app()->name;

?>
<script type="text/javascript">
<!--
$(function(){
//	$("a[rel=colorbox]").colorbox({
//		'maxWidth':'95%',
//		'maxHeight':'95%',
//		'href':$(this).find("img").attr("src")
//	});
});

function productShow(){	
	$("a[rel=colorbox]").colorbox({
		'maxWidth':'95%',
		'maxHeight':'95%'
	});
}

//-->
</script>

<div id="product-list" style="margin-left:40px;">
	<?php	foreach($dataProvider as $data):?>		
		<?php $this->renderPartial('_pview',array('data'=>$data));?>
	<?php endforeach;?>
</div>
<?php $this->widget('ext.paginate.yiinfinite-scroll.YiinfiniteScroller', array(
    'contentSelector' => '#product-list',
    'itemSelector' => 'div.product-item-view',
    'loadingText' => 'Loading...',
    'donetext' => 'This is the end... my only friend, the end',
    'pages' => $pages,
)); ?>

<?php 
 	//Create an instance of ColorBox
 	$this->widget('application.extensions.box.colorbox.colorboxWidget');

?>
